from celery_task import add
from datetime import datetime,timedelta


# 方式二
ctime = datetime.now()
# 默认使用utc时间

utc_ctime = datetime.utcfromtimestamp(ctime.timestamp())
time_delay = timedelta(seconds=10)
task_time = utc_ctime + time_delay

# 使用apply_async并设定时间
result = add.apply_async(args=[3,4],etc=task_time)
print(result.id)





